package swing.admin.views.main;

import swing.admin.common.AdminContextHolder;

import javax.swing.*;
import java.awt.*;

public class AdminMain extends JPanel {
    public AdminMain(CardLayout layout) {
        setLayout(layout);
        initCard();
    }

    private void initCard() {
        AdminContextHolder.getContext().getMenuCardList().forEach(card->{
            add(card,card.getMenuName());
        });
    }
}
